package com.alorm.core.sqlite.annotation;

import java.util.ArrayList;
import java.util.List;

import com.alorm.core.exceptions.AlormException;
import com.impetus.annovention.listener.ClassAnnotationDiscoveryListener;

public class AnnotationClass implements ClassAnnotationDiscoveryListener {

	private List<Class> listClass = new ArrayList<Class>();

	public AnnotationClass(List<Class> l) {
		listClass = l;
	}

	public String[] supportedAnnotations() {
		return new String[] { EntityClass.class.getName() };
	}

	public void discovered(String classe, String name) {
		
		System.out.println(listClass);
		try {
			listClass.add(Class.forName(classe));
		} catch (ClassNotFoundException e) {
			throw new AlormException("", e);
		}

	}
}
